]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
shell-app-usage: fix tracking code
authorDan Winship <danw@gnome.org>
Mon, 24 Jan 2011 18:25:09 +0000 (13:25 -0500)
committerDan Winship <danw@gnome.org>
Mon, 24 Jan 2011 18:35:03 +0000 (13:35 -0500)
We were checking if the app was running, but then marking it as
recently-seen either way. Fix it to only update it when the app is
running.

https://bugzilla.gnome.org/show_bug.cgi?id=640447

src/shell-app-usage.c

index 6126dc09697683153ca35ecd4ae89b6581c5e364..e8fe3ae8ac15e82114696bd83eb5d015ac041360 100644 (file)
@@ -324,7 +324,8 @@ on_app_state_changed (ShellWindowTracker *tracker,
 
   running = shell_app_get_state (app) == SHELL_APP_STATE_RUNNING;
 
-  usage->last_seen = get_time ();
+  if (running)
+    usage->last_seen = get_time ();
 }
 
 static void